package org.hxzon.tapestry5.util;

import org.apache.tapestry5.ioc.services.Coercion;

public class StringToCharCoercion implements Coercion<String, Character> {

    @Override
    public Character coerce(String input) {
        if (input.isEmpty()) {
            return '\0';
        }
        return input.charAt(0);
    }

}
